package com.example.film.service;

import com.example.film.entity.Top100ChinaSell;
import com.example.film.mapper.Top100ChinaSellMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class Top100ChinaSellServiceImpl implements Top100ChinaSellService{

    @Autowired
    private Top100ChinaSellMapper top100ChinaSellMapper;

    @Override
    public List<Top100ChinaSell> findTop100ChinaSell() {
        return top100ChinaSellMapper.findTop100ChinaSell();
    }

    @Override
    public List<Top100ChinaSell> findTop100ChinaSellInfo(Integer pageNum, Integer pageSize) {
        int startIndex = (pageNum - 1) * pageSize;
        return top100ChinaSellMapper.findTop100ChinaSellInfo(startIndex, pageSize);
    }

    @Override
    public List<Top100ChinaSell> findFilmEachMaxSell() {
        return top100ChinaSellMapper.findFilmEachMaxSell();
    }
}
